using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace EFDataBase.Models.Mapping
{
    public class taocan_list_backMap : EntityTypeConfiguration<taocan_list_back>
    {
        public taocan_list_backMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.id)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.area)
                .HasMaxLength(50);

            this.Property(t => t.brand)
                .HasMaxLength(50);

            this.Property(t => t.tongshu)
                .HasMaxLength(50);

            this.Property(t => t.shengyu_tongshu)
                .HasMaxLength(50);

            this.Property(t => t.qiantong)
                .HasMaxLength(50);

            this.Property(t => t.shuifei)
                .HasMaxLength(50);

            this.Property(t => t.yajin)
                .HasMaxLength(50);

            this.Property(t => t.yishou)
                .HasMaxLength(50);

            this.Property(t => t.shouji)
                .HasMaxLength(150);

            this.Property(t => t.beizu)
                .HasMaxLength(350);

            this.Property(t => t.state)
                .HasMaxLength(50);

            this.Property(t => t.state_text)
                .IsFixedLength()
                .HasMaxLength(40);

            this.Property(t => t.time)
                .HasMaxLength(50);

            this.Property(t => t.delect)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("taocan_list_back");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.area).HasColumnName("area");
            this.Property(t => t.Louhao).HasColumnName("Louhao");
            this.Property(t => t.sushe_number).HasColumnName("sushe_number");
            this.Property(t => t.brand).HasColumnName("brand");
            this.Property(t => t.tongshu).HasColumnName("tongshu");
            this.Property(t => t.shengyu_tongshu).HasColumnName("shengyu_tongshu");
            this.Property(t => t.qiantong).HasColumnName("qiantong");
            this.Property(t => t.shuifei).HasColumnName("shuifei");
            this.Property(t => t.yajin).HasColumnName("yajin");
            this.Property(t => t.yishou).HasColumnName("yishou");
            this.Property(t => t.shouji).HasColumnName("shouji");
            this.Property(t => t.beizu).HasColumnName("beizu");
            this.Property(t => t.state).HasColumnName("state");
            this.Property(t => t.state_text).HasColumnName("state_text");
            this.Property(t => t.time).HasColumnName("time");
            this.Property(t => t.delect).HasColumnName("delect");
            this.Property(t => t.update_time).HasColumnName("update_time");
        }
    }
}
